load("@rules_cc//cc:cc_test.bzl", "cc_test")
load(":tools.bzl", "test_set")

TEST_COPTS = select({
    "@platforms//os:windows": [],
    "//conditions:default": [
        "-g",  # Debug symbols
        "-Wall",  # All warnings
    ],
})

DEPS = [
    "//:fastjson",
    "//:fastjson-test-srcs",
    "@saru",
]

test_suite(
    name = "all_tests",
    tests = test_set(
        copts = TEST_COPTS,
        test_files = glob(
            ["**/*.cpp"],
            exclude = ["misc/speed_test_boost.cpp"],
        ),
        deps = DEPS,
    ) + [":speed_test"],
)

cc_test(
    name = "speed_test",
    size = "medium",
    srcs = ["misc/speed_test_boost.cpp"],
    copts = TEST_COPTS,
    deps = DEPS + [
        "@boost.property_tree",
    ],
)
